﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileLivingProcessAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileLivingProcessAdmin" %>

<owc:OwGrid ID="HomeProfileLivingProcessGrid" runat="server" SkinID="OwGridAdmin"
    AllowPaging="true" DataKeyNames="OpenHomeProfileLivingProcessID" DataSourceID="HomeProfileLivingProcessOds"
    AutoGenerateColumns="False">
    <MasterTableView DataSourceID="HomeProfileLivingProcessOds" DataKeyNames="OpenHomeProfileLivingProcessID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>" RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileLivingProcessID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b>
                                    <%# Eval("Name") %>
                                </b></a>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="ProfileDetailOwR" runat="Server" OwText="ProfileDetailLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwOpenHomeProfileDetailsBLL.OwGetEntity(Eval("OpenHomeProfileDetailID").OwToInt64TryParseReturn0()).Title%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="StartDateOwR" runat="Server" OwText="StartDateLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeStart").OwToDateTimePublishDate() %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="EndDateOwR" runat="Server" OwText="EndDateLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeEnd").OwToDateTimePublishDate() %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR ID="LanguageOwR" runat="server" OwText="Language" OwSuffix=":" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ContinentOwR" runat="server" OwText="ContinentLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("ContinentID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="CountryOwR" runat="Server" OwText="CountryLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("CountryID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ProvinceOwR" runat="Server" OwText="ProvinceLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("ProvinceID").OwToInt64TryParseReturn0()).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DistrictOwR" runat="Server" OwText="DistrictLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("DistrictID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="WardOwR" runat="Server" OwText="WardLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# OwLocalitiesBLL.OwGetEntity(Eval("WardID").OwToInt64TryParseReturn0()).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DescriptionOwR" runat="server" OwText="DescriptionLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("Description") %>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Eval("IsDeleted")%>' Text='<%# Eval("OpenHomeProfileLivingProcessID") %>'
                                    CssClass="HiddenText" OnCheckedChanged="IsDeletedCheckBox_CheckedChanged" AutoPostBack="true" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="IsHomeTownLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox SkinID="OwCheckBox" ID="IsHomeTownCbx" runat="server" 
                                    Checked='<%#Eval("IsHomeTown")%>' Text='<%# Eval("OpenHomeProfileLivingProcessID") %>'
                                   AutoPostBack="true" CssClass="HiddenText" 
                                    oncheckedchanged="IsHomeTownCbx_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfileLivingProcessEdit.aspx?id=<%#Eval("OpenHomeProfileLivingProcessID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="HomeProfileLivingProcessOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileLivingProcessEntity"
    DeleteMethod="OwDelete" OldValuesParameterFormatString="original_{0}" 
    SelectMethod="OwGetByDynamic" EnablePaging="True" SelectCountMethod="OwGetByDynamicCount"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileLivingProcessBLL" 
    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter DefaultValue="false" Name="isDeleted" Type="Boolean" />
        <asp:Parameter DefaultValue="" Name="continentID" Type="Int64" />
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="provinceID" Type="Int64" />
        <asp:Parameter Name="districtID" Type="Int64" />
        <asp:Parameter Name="wardID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="isHomeTown" Type="Boolean" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" DefaultValue="10" Type="Int32" />        
    </SelectParameters>
</owc:OwObjectDataSource>
